Skip to content

[ARM:Bugfix] Enable MNNRankOneUpdate fallback on Apple Silicon#4579

Open
lanling-47 wants to merge 1 commit into
alibaba:masterfrom
lanling-47:arm/apple-rankone-fallback
Open

[ARM:Bugfix] Enable MNNRankOneUpdate fallback on Apple Silicon#4579
lanling-47 wants to merge 1 commit into
alibaba:masterfrom
lanling-47:arm/apple-rankone-fallback

Conversation

@lanling-47

Copy link
Copy Markdown
Contributor

Description

The MNNRankOneUpdateDefault C++ fallback was guarded by #ifndef __aarch64__, which excludes Apple Silicon (which also defines __aarch64__). However, the NEON assembly path for MNNRankOneUpdate is not wired up for this op on Apple platforms, causing a missing implementation at link/runtime.

Fix by changing the guard to #if !defined(__aarch64__) || defined(__APPLE__), so the fallback is compiled on Apple Silicon as well.

Tested on: Apple M4 (ARM64, Apple Silicon)

Module

  • ARM

Type

  • Bugfix

Checklist

  • Commit message format: [Module:Type] Description
  • Compiles without errors
  • Tested on Apple M4
  • No unrelated style changes

The MNNRankOneUpdateDefault C++ fallback was guarded by
#ifndef __aarch64__, which excludes Apple Silicon (which also
defines __aarch64__). However, the NEON assembly path for
MNNRankOneUpdate is not wired up for this op on Apple platforms,
causing a missing implementation at link/runtime.

Fix by also compiling the fallback when __APPLE__ is defined.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant